import java.util.Scanner;

/**
 * ClassName: Factorial
 * Package: PACKAGE_NAME
 * Description:
 *
 * @Author harkjeans
 * @Create 2025/9/1 20:36
 * @Version 1.0
 */
public class FactorialTest {
    public static void main(String[] args) {
        FactorialTest test = new FactorialTest();

        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入一个大于0的整数:");
        int n = scanner.nextInt();

        System.out.println(test.Factorial(n));
    }

     public int Factorial(int n){
         if (n == 1){
             return 1;
         }
         return n * Factorial(n - 1);
     }

}
